<div class="site_section_header">
	Add/Edit a banner
</div>

<?php

if(isset($errors))
{
	echo $errors;
}
else if(isset($message))
{
?><div class="ep_message"><?php echo $message; ?></div><?php
}

$banner_name = isset($banner_name) ? $banner_name : $oBanner->banner_name;

?>

<form action="/admin/banners/save_banner" method="post" enctype="multipart/form-data" onsubmit="">
<div id="banners_main_wrapper">
	
	<div class="ep_seption">
		<div class="eps_header"><div class="eps_header_name">Banner details</div></div>
		<div class="eps_content">
			
			<div class="ep_field_wrapper">
				<div class="ep_field_title">Banner name<span class="ep_field_required">*</span></div>
				<div class="ep_field"><input type="text" name="banner_name" id="banner_name" value="<?php echo $banner_name; ?>" /></div>
				<div class="clear"><!-- --></div>
			</div>
			<div class="ep_field_wrapper">
				<div class="ep_field_title">Image<span class="ep_field_required">*</span></div>
				<div class="ep_field"><input type="button" value="Select" onclick="open_media_manager();" /></div>
				<div class="clear"><!-- --></div>
			</div>
				
			<div class="ep_field_wrapper">
				<div class="ep_field_title"><!-- --></div>
				<div class="ep_field" id="image_wrapper">
				<?php
				if(isset($oBanner->oMedia) && $oBanner->oMedia->media_id > 0)
				{
					$oMedia = $oBanner->oMedia;
				?>
					<img src="/assets/media/web/<?php echo $oMedia->media_subfolder; ?>/<?php echo $oMedia->media_id; ?>.<?php echo $oMedia->extension_ext; ?>" />
				<?php
				}
				?>
				</div>
				<div class="clear"><!-- --></div>
			</div>
				
		</div>
	</div>
	
	<div style="padding: 2px;">
		<input type="hidden" id="banner_image" name="banner_image" value="<?php echo $oBanner->oMedia->media_id; ?>" />
		<input type="hidden" id="banner_id" name="banner_id" value="<?php echo $oBanner->banner_id; ?>" />
		
		<input type="image" id="edit_component_save_button" src="/assets/images/web/admin/buttons/save.png" /> 
		<a href="/admin/banners"><img src="/assets/images/web/admin/buttons/cancel.png" style="border:none;" /></a>
	</div>
	
</div>
</form>